package com.example.springbootlearn.listener;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ApplicationListener;

/**
 * @author caiji Mr. Li
 * @date 2019/10/28 23:55
 */
public class SpringEventListenerBootStrap {
    public static void main(String[] args) {
        new SpringApplicationBuilder(Object.class)
                .listeners(event -> {
                    System.out.println("SpringApplication 事件监听器 ： "+event.getClass().getSimpleName());
                })
                .web(WebApplicationType.NONE)
                .run(args)
                .close();
    }
}
